java.lang.Object
ddejonge.bandana.anac.ANACNegotiator
public abstract class ANACNegotiator
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_FINAL_YEAR
es.csic.iiia.fabregues.dip.board.Game
game
es.csic.iiia.fabregues.dip.board.Power
me
-
Constructor Summary
Constructors Constructor Description ANACNegotiator(java.lang.String[] args)
-
Method Summary
Modifier and Type Method Description void
acceptProposal(java.lang.String proposalID)
java.util.List<BasicDeal>
getConfirmedDeals()
Returns a copy of the list of deals that the agent is currently committed to.Logger
getLogger()
java.util.List<es.csic.iiia.fabregues.dip.board.Power>
getNegotiatingPowers()
DBraneTactics
getTacticalModule()
java.util.ArrayList<DiplomacyProposal>
getUnconfirmedProposals()
boolean
hasMessage()
boolean
isHistory(es.csic.iiia.fabregues.dip.board.Phase phase, int year)
Returns true if the given phase and year are in the past with respect to the current phase and year of the game.abstract void
negotiate(long deadline)
void
proposeDeal(BasicDeal deal)
void
proposeDraw()
You can call this method if you want to propose a draw.abstract void
receivedOrder(es.csic.iiia.fabregues.dip.orders.Order arg0)
void
rejectProposal(java.lang.String proposalID)
es.csic.iiia.negoServer.Message
removeMessageFromQueue()
void
run()
abstract void
start()
-
Field Details
-
DEFAULT_FINAL_YEAR
public static final int DEFAULT_FINAL_YEAR- See Also:
- Constant Field Values
-
game
public es.csic.iiia.fabregues.dip.board.Game game -
me
public es.csic.iiia.fabregues.dip.board.Power me
-
-
Constructor Details
-
ANACNegotiator
public ANACNegotiator(java.lang.String[] args)
-
-
Method Details
-
negotiate
public abstract void negotiate(long deadline) -
run
public final void run() -
start
public abstract void start() -
receivedOrder
public abstract void receivedOrder(es.csic.iiia.fabregues.dip.orders.Order arg0) -
hasMessage
public final boolean hasMessage() -
removeMessageFromQueue
public final es.csic.iiia.negoServer.Message removeMessageFromQueue() -
getUnconfirmedProposals
-
proposeDeal
-
acceptProposal
public final void acceptProposal(java.lang.String proposalID) -
rejectProposal
public final void rejectProposal(java.lang.String proposalID) -
getTacticalModule
-
getNegotiatingPowers
public final java.util.List<es.csic.iiia.fabregues.dip.board.Power> getNegotiatingPowers() -
getLogger
-
getConfirmedDeals
Returns a copy of the list of deals that the agent is currently committed to.- Returns:
-
isHistory
public final boolean isHistory(es.csic.iiia.fabregues.dip.board.Phase phase, int year)Returns true if the given phase and year are in the past with respect to the current phase and year of the game.- Parameters:
phase
-year
-- Returns:
-
proposeDraw
public final void proposeDraw()You can call this method if you want to propose a draw. If all players that are not yet eliminated propose a draw in the same phase, then the server ends the game. Copy-paste this method into your own bot if you want it to be able to propose draws.
-